// 搜索栏
import 'package:flutter/material.dart';

class DeleteModal extends StatefulWidget {
  final void Function() onRemove;
  const DeleteModal({Key key, this.onRemove}) : super(key: key);

  @override
  _DeleteModalState createState() => _DeleteModalState();
}

class _DeleteModalState extends State<DeleteModal> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 132,
      color: Color.fromRGBO(0, 0, 0, 0.55),
      child: Container(
        height: 132,
        decoration: BoxDecoration(
          color: Color.fromRGBO(243, 243, 243, 1),
          borderRadius: BorderRadius.only(
            topLeft: Radius.circular(8),
            topRight: Radius.circular(8),
          ),
        ),
        child: Column(
          children: <Widget>[
            GestureDetector(
              onTap: () {
                Navigator.of(context).pop();
                widget.onRemove();
              },
              child: Container(
                width: double.infinity,
                height: 62,
                alignment: Alignment.center,
                decoration: BoxDecoration(
                  color: Color.fromRGBO(255, 255, 255, 1),
                  borderRadius: BorderRadius.only(
                    topLeft: Radius.circular(8),
                    topRight: Radius.circular(8),
                  ),
                ),
                child: Text(
                  '删除',
                  style: TextStyle(
                    fontSize: 16,
                    height: 22 / 16,
                    color: Color.fromRGBO(43, 44, 46, 1),
                  ),
                ),
              ),
            ),
            GestureDetector(
              onTap: () {
                Navigator.of(context).pop();
              },
              child: Container(
                width: double.infinity,
                height: 62,
                alignment: Alignment.center,
                margin: EdgeInsets.only(top: 8),
                color: Color.fromRGBO(255, 255, 255, 1),
                child: Text(
                  '取消',
                  style: TextStyle(
                    fontSize: 16,
                    height: 22 / 16,
                    color: Color.fromRGBO(43, 44, 46, 1),
                  ),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
